home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Trial / Webroot Internet Security Essentials / WebrootSecurityTrialSetup_EN.exe / {tmp} / SpySweeperQuickStart.chm / scripts / page.js < prev    next >
Text File  |  2008-11-13  |  3KB  |  113 lines

  1. // Copyright (c) 2002-2005 Quadralay Corporation.  All rights reserved.
  2. //
  3.  
  4. function  HTMLHelpUtility_NotifyClickedPopup()
  5. {
  6.   // Not a member function, need to access via variable
  7.   //
  8.   WebWorksHTMLHelp.mbPopupClicked = true;
  9. }
  10.  
  11. function  HTMLHelp_Object()
  12. {
  13.   this.mbPopupClicked  = false;
  14.   this.mbOverPopupLink = false;
  15.   this.mEvent          = null;
  16.   this.mPopup          = new HTMLHelpPopup_Object("WebWorksHTMLHelp.mPopup",
  17.                                                   "window",
  18.                                                   HTMLHelpUtility_NotifyClickedPopup,
  19.                                                   "HTMLHelpPopupDIV", "HTMLHelpPopupText",
  20.                                                   10, 12, 20, 400);
  21.  
  22.   this.fNotifyClicked  = HTMLHelp_NotifyClicked;
  23.   this.fMouseOverPopup = HTMLHelp_MouseOverPopup;
  24.   this.fMouseOutPopup  = HTMLHelp_MouseOutPopup;
  25.   this.fShowPopup      = HTMLHelp_ShowPopup;
  26.   this.fPopupLoaded    = HTMLHelp_PopupLoaded;
  27.   this.fHidePopup      = HTMLHelp_HidePopup;
  28.   this.fPopupDivTag    = HTMLHelp_PopupDivTag;
  29. }
  30.  
  31. function  HTMLHelp_NotifyClicked()
  32. {
  33.   if (this.mbPopupClicked)
  34.   {
  35.     this.mbPopupClicked = false;
  36.   }
  37.   else if ( ! this.mbOverPopupLink)
  38.   {
  39.     this.fHidePopup();
  40.   }
  41. }
  42.  
  43. function  HTMLHelp_MouseOverPopup(ParamEvent)
  44. {
  45.   this.mbOverPopupLink = true;
  46.  
  47.   this.mEvent = new Object();
  48.   this.mEvent.x = ParamEvent.x;
  49.   this.mEvent.y = ParamEvent.y;
  50. }
  51.  
  52. function  HTMLHelp_MouseOutPopup()
  53. {
  54.   this.mbOverPopupLink = false;
  55. }
  56.  
  57. function  HTMLHelp_ShowPopup(ParamLink)
  58. {
  59.   var  VarHTML;
  60.  
  61.   if (this.mEvent != null)
  62.   {
  63.     VarHTML = "<iframe id=\"WWHPopupIFrame\" width=\"" + this.mPopup.mWidth + "\" src=\"" + ParamLink + "\" onload=\"javascript:WebWorksHTMLHelp.fPopupLoaded()\"></iframe>";
  64.     this.mbPopupClicked = false;
  65.     this.mPopup.fShow(VarHTML, this.mEvent);
  66.   }
  67.  
  68.   this.mEvent = null;
  69. }
  70.  
  71. function  HTMLHelp_PopupLoaded()
  72. {
  73.   var  VarPopupDocument;
  74.   var  VarIFrame;
  75.   var  VarHeight;
  76.  
  77.   // Access popup document
  78.   //
  79.   VarPopupDocument = eval(this.mPopup.mWindowRef + ".document");
  80.  
  81.   // Access popup iframe
  82.   //
  83.   VarIFrame = VarPopupDocument.all['WWHPopupIFrame'];
  84.  
  85.   // Set height again before width set
  86.   //
  87.   VarHeight = VarIFrame.contentWindow.document.body.scrollHeight + 32 + 4;
  88.   VarIFrame.height = VarHeight;
  89.  
  90.   // Set width
  91.   //
  92.   VarWidth = VarIFrame.contentWindow.document.body.scrollWidth + 32 + 4;
  93.   if (VarWidth > this.mPopup.mWidth)
  94.   {
  95.     VarIFrame.width = VarWidth;
  96.   }
  97.  
  98.   // Set height again after width set
  99.   //
  100.   VarHeight = VarIFrame.contentWindow.document.body.scrollHeight + 32 + 4;
  101.   VarIFrame.height = VarHeight;
  102. }
  103.  
  104. function  HTMLHelp_HidePopup()
  105. {
  106.   this.mPopup.fHide();
  107. }
  108.  
  109. function  HTMLHelp_PopupDivTag()
  110. {
  111.   return this.mPopup.fDivTagText();
  112. }
  113.